function DeathKnightG1zStar2()

	_ThrottleFrame()

	if SIR(57330) and not ccrPHB("Horn of Winter") then ccrCast(57330, "player") return end
	if GetShapeshiftForm() ~= 2 then CastShapeshiftForm(2) return end -- seal of insight
	if ccrPIIC() then

		local blood, frost, unholy, death = GetRunesG1zStar()

		if ccrValidTarget() and ccrPIIC() then

			-- TauntTrainer()
			InterruptTrainer()
			
			-- if isStun and SCA(853) then -- hammer of justice
			-- 	ccrCastAttack(853)
			-- 	return
			-- end
			
			if SIR(51271) and useCDS then ccrCast(51271) end
			if SIR(46584) and useCDS then ccrCast(46584) return end

			if ccrTargetCount() > 2 then

				if ccrPlayerHasTalent("Unholy Blight") and SIR(115989) and ccrPlayerCount(10) > 2 then ccrCast(115989) return end
				if SCA(50842) and (tLastUsedPestilence == nil or GetTime() > tLastUsedPestilence+28) and ccrTargetHasDebuff("Blood Plague") and ccrPlayerHasTalent("Plague Leech") then ccrCastAttack(50842) return end
				if SCA(50842) and (tLastUsedPestilence == nil or GetTime() > tLastUsedPestilence+28) and ccrTargetHasDebuff("Blood Plague") and ccrPlayerHasTalent("Unholy Blight") and SpellCDDuration(115989) < 49 then ccrCastAttack(50842) return end
				if SIR(49184) then ccrCast(49184) return end
				if ccrPlayerHasTalent("Blood Tap") and SIR(45529) and ccrPHBS(114851, 10) then ccrCast(45529) return end
				if SCA(49143) and ccrRunicPower() > 76 then ccrCastAttack(49143) return end
				if SIR(43265) and unholy == 1 then
					ccrCast(43265)
					CastAtLocation(Target:GetLocation())
					return
				end
				if SCA(45462) and unholy == 2 then ccrCastAttack(45462) return end
				if ccrPlayerHasTalent("Blood Tap") and SIR(45529) and ccrPHBS(114851, 5) then ccrCast(45529) return end
				if SCA(49143) then ccrCastAttack(49143) return end
				if SIR(57330) then ccrCast(57330) return end
				if ccrPlayerHasTalent("Plague Leech") and SIR(123693) and unholy == 1 then ccrCast(123693) return end
				if SCA(45462) and unholy == 1 then ccrCastAttack(45462) return end
				if SIR(47568) and useCDS then ccrCast(47568) return end
			else
				if ccrPlayerHasTalent("Plague Leech") and SIR(123693) and ((ccrTargetHasDebuff(55078) and not ccrTargetHasDebuffRemaining(55078, 1)) or (ccrTargetHasDebuff(55095) and ccrTargetHasDebuffRemaining(55095, 1))) then ccrCast(123693) return end
				if SIR(77575) and (not ccrTargetHasDebuff(55078) or not ccrTargetHasDebuff(55095)) then ccrCast(77575) return end
				if ccrPlayerHasTalent("Unholy Blight") and SIR(115989) and (not ccrTargetHasDebuff(55078) or not ccrTargetHasDebuff(55095)) then ccrCast(115989) return end
				-- soul reaper
				if SIR(49184) and Target:GetDistance() < 10 and not ccrTargetHasDebuff(55095) then ccrCast(49184) return end
				if SCA(45462) and not ccrTargetHasDebuff(55078) then ccrCastAttack(45462) return end
				if SIR(49184) and Target:GetDistance() < 10 and ccrPHB(59052) then ccrCast(49184) return end
				if SCA(49020) and ccrPHB(51124) then ccrCastAttack(49020) return end
				if ccrPlayerHasTalent("Blood Tap") and SIR(45529) and ccrPHBS(114851, 5) and ccrPHB(51124) then ccrCast(45529) return end
				if ccrPlayerHasTalent("Blood Tap") and SIR(45529) and ccrPHBS(114851, 10) and ccrRunicPower() > 76 then ccrCast(45529) return end
				if SCA(49143) and ccrRunicPower() > 76 then ccrCastAttack(49143) return end
				if SCA(49020) and (blood == 2 or unholy == 2 or frost == 2) then ccrCastAttack(49020) return end
				if ccrPlayerHasTalent("Plague Leech") and SIR(123693) and ((ccrTargetHasDebuff(55078) and not ccrTargetHasDebuffRemaining(55078, 3)) or (ccrTargetHasDebuff(55095) and ccrTargetHasDebuffRemaining(55095, 3))) then ccrCast(123693) return end
				if SIR(77575) and ((ccrTargetHasDebuff(55078) and not ccrTargetHasDebuffRemaining(55078, 3)) or (ccrTargetHasDebuff(55095) and ccrTargetHasDebuffRemaining(55095, 3))) then ccrCast(77577) return end
				if ccrPlayerHasTalent("Unholy Blight") and SIR(115989) and ((ccrTargetHasDebuff(55078) and not ccrTargetHasDebuffRemaining(55078, 3)) or (ccrTargetHasDebuff(55095) and ccrTargetHasDebuffRemaining(55095, 3))) then ccrCast(115989) return end
				if ccrPlayerHasTalent("Runic Empowerement") and SCA(49143) and (frost == 0 or unholy == 0 or blood == 0) then ccrCastAttack(49143) return end
				if ccrPlayerHasTalent("Blood Tap") and SCA(49143) and not ccrPHBS(114851, 11) then ccrCastAttack(49143) return end
				if SIR(57330) then ccrCast(57330) return end
				if SCA(49020) then ccrCastAttack(49020) return end
				if ccrPlayerHasTalent("Blood Tap") and SIR(45529) and ccrPHBS(114851, 11) and ccrRunicPower() > 19 then ccrCast(45529) return end
				if SCA(49143) then ccrCastAttack(49143) return end
				-- if ccrPlayerHasTalent("Plague Leech") and SIR(123693) and (ccrTargetHasDebuff)
				if SIR(47568) and useCDS then ccrCast(47568) return end
			end
		end
	end
end